package br.com.nuccitec.jfera.event {
	import mx.events.FlexEvent;

	public class RemoteEvent extends FlexEvent {
		public var objectVO:Object;
		public var remoteId:String;
		public var contentCallBack:Function;
		public var messageCallBack:Function;
		static public const REMOTE_EVENT:String="executeRemoteObject";

		public function RemoteEvent(type:String,objectVO:Object=null,contentCallBack:Function=null,messageCallBack:Function=null,executeOnServer:Boolean=true,bubbles:Boolean=true,cancelable:Boolean=true) {
			super(executeOnServer?REMOTE_EVENT:type,bubbles,cancelable);
			this.objectVO=objectVO;
			remoteId=executeOnServer?type:null;
			this.contentCallBack=contentCallBack;
			this.messageCallBack=messageCallBack;
		}

		public function get executeOnServer():Boolean {
			return remoteId!=null;
		}
	}
}